package com.kj.tms.common.bean.exception;

/**
 * 业务异常信息返回
 */
public class BusinessException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	private String code;
	private String msg;
	private Object object;

	public BusinessException() {
	}

	public BusinessException(String message) {
		super(message);
		this.msg = message;
	}

	public BusinessException(Throwable cause) {
		super(cause);
	}

	public BusinessException(String message, Throwable cause) {
		super(message, cause);
		this.msg = message;
	}

	public BusinessException(String code, String message, Throwable cause) {
		super(message, cause);
		this.msg = message;
		this.code = code;
	}

	/**
	 * <默认构造函数>
	 */
	public BusinessException(String code, String msg) {
		super(msg);
		this.code = code;
		this.msg = msg;
	}


	/**
	 * <默认构造函数>
	 *
	 * @param object
	 */
	public BusinessException(String code, String msg, Object object) {
		super(msg);
		this.code = code;
		this.msg = msg;
		this.object = object;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}

}
